package com.di.base.feign;

import com.di.base.interceptor.FeignSeataInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

// 账户服务
@FeignClient(name = "account-service",  configuration = FeignSeataInterceptor.class)
public interface AccountClient {
    @GetMapping("/account/debit")
    void debitAccount(@RequestParam("userId") String userId, @RequestParam("amount") BigDecimal amount);
}